<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">

    <!-- Always force latest IE rendering engine or request Chrome Frame -->
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Use title if it's in the page YAML frontmatter -->
    <title>Auto-Start XAMPP</title>

    
    

    <link href="/dashboard/stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" />
    <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

    <script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script>


    <link href="/dashboard/images/favicon.png" rel="icon" type="image/png" />


  </head>

  <body class="docs docs_auto-start-xampp">
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="contain-to-grid">
      <nav class="top-bar" data-topbar>
        <ul class="title-area">
          <li class="name">
            <h1><a href="/dashboard/index.html">Apache Friends</a></h1>
          </li>
          <li class="toggle-topbar menu-icon">
            <a href="#">
              <span>Menu</span>
            </a>
          </li>
        </ul>

        <section class="top-bar-section">
          <!-- Right Nav Section -->
          <ul class="right">
              <li class=""><a href="/applications.html">Applications</a></li>
              <li class=""><a href="/dashboard/faq.html">FAQs</a></li>
              <li class="active"><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
              <li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
              <li class=""><a href="/phpmyadmin/">phpMyAdmin</a></li>
          </ul>
        </section>
      </nav>
    </div>

    <div id="wrapper">
      <div class="hero">
  <div class="row">
    <div class="large-12 columns">
      <h1>Documentation</h1>
    </div>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <ul class="sub-nav">
      <li>
<a class="pdf" target="_blank" href="/dashboard/docs/auto-start-xampp.pdf">          Download PDF
          <span>auto-start-xampp.pdf</span>
</a>      </li>
    </ul>
    <article class="asciidoctor">
        <aside>
          <h3>Contents</h3>
          <ol class="sections">
              <li><a href="/dashboard/docs/auto-start-xampp.html#debian_like_distributions_debian_ubuntu">Debian-like Distributions (Debian, Ubuntu, &#8230;&#8203;)</a></li>
              <li><a href="/dashboard/docs/auto-start-xampp.html#redhat_like_distributions_red_hat_fedora_core_centos_suse">RedHat-like Distributions (Red Hat, Fedora Core, CentOS, Suse, &#8230;&#8203;)</a></li>
          </ol>
        </aside>
      <h1>Auto-Start XAMPP</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>By default, you have to start XAMPP or its components manually every time you reboot your system. However, you can also configure XAMPP components to start automatically on system boot. Follow the steps below for your platform.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_debian_like_distributions_debian_ubuntu">Debian-like Distributions (Debian, Ubuntu, &#8230;&#8203;)</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Copy the <em>/opt/lampp/lampp</em> script to the <em>/etc/init.d</em> directory.</p>
<div class="literalblock">
<div class="content">
<pre>sudo cp /opt/lampp/lampp /etc/init.d</pre>
</div>
</div>
</li>
<li>
<p>Add or modify the following lines at the beginning of the <em>/etc/init.d/lampp</em> script.</p>
<div class="literalblock">
<div class="content">
<pre>### BEGIN INIT INFO
# Provides:          xampp
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start XAMPP at boot time
# Description:       Enable services provided by XAMPP.
### END INIT INFO</pre>
</div>
</div>
</li>
<li>
<p>Add the script to the default runlevels and enable it.</p>
<div class="literalblock">
<div class="content">
<pre>sudo update-rc.d -f lampp defaults
sudo update-rc.d -f lampp enable</pre>
</div>
</div>
</li>
<li>
<p>Reboot your system and XAMPP should start automatically.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>To revert the changes, use the commands below:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>cd /etc/init.d
sudo update-rc.d -f lampp remove</pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_redhat_like_distributions_red_hat_fedora_core_centos_suse">RedHat-like Distributions (Red Hat, Fedora Core, CentOS, Suse, &#8230;&#8203;)</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Copy the <em>/opt/lampp/lampp</em> script to the <em>/etc/init.d</em> directory.</p>
<div class="literalblock">
<div class="content">
<pre>sudo cp /opt/lampp/lampp /etc/init.d</pre>
</div>
</div>
</li>
<li>
<p>Add or modify the following lines at the top of the /etc/init.d/lampp script:</p>
<div class="literalblock">
<div class="content">
<pre>#!/bin/sh
#
# chkconfig: 2345 80 30
# description: XAMPP</pre>
</div>
</div>
<div class="paragraph">
<p>This will execute the script in runlevels 2, 3, 4 and 5, with priority 80 to start and 30 to stop.</p>
</div>
</li>
<li>
<p>Install the script as a service.</p>
<div class="literalblock">
<div class="content">
<pre>sudo chkconfig --add lampp</pre>
</div>
</div>
</li>
<li>
<p>Reboot your system and XAMPP should start automatically.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>To revert the changes, use the command below:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>sudo chkconfig --del lampp</pre>
</div>
</div>
</div>
</div>
    </article>
  </div>
</div>

    </div>

    <footer>
      <div class="row">
        <div class="large-12 columns">
          <div class="row">
            <div class="large-8 columns">
              <ul class="social">
  <li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li>
  <li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li>
  <li class="google"><a href="https://plus.google.com/+xampp/posts">Add us to your G+ Circles</a></li>
</ul>

              <ul class="inline-list">
                <li><a href="https://www.apachefriends.org/blog.html">Blog</a></li>
                <li><a href="https://www.apachefriends.org/privacy_policy.html">Privacy Policy</a></li>
                <li>
<a target="_blank" href="http://www.fastly.com/">                    CDN provided by
                    <img width="48" data-2x="/dashboard/images/fastly-logo@2x.png" src="/dashboard/images/fastly-logo.png" />
</a>                </li>
              </ul>
            </div>
            <div class="large-4 columns">
              <p class="text-right">Copyright (c) 2018, Apache Friends</p>
            </div>
          </div>
        </div>
      </div>
    </footer>

    <!-- JS Libraries -->
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="/dashboard/javascripts/all.js" type="text/javascript"></script>
  </body>
</html>
